package com.pattern;

/**
 *
 * 饿汉式
 */
public class Singleton {

    private Singleton() {}

    private static Singleton singleton=new Singleton();

    public static Singleton getInstance() {
        return Singleton.singleton;
    }
}
